<div class="editcate_top">
    <h2>Sửa câu hỏi</h2>
    <a href="javascript:void(0)" onclick ="$('#light_adct').hide();$('#fade_adct').hide()"><img src="<?php echo img_link('close.png', 'admin'); ?>" class="png" /></a>
</div>

<div id="div_message"></div>
<form enctype="multipart/form-data" method="post" action="<?php echo action_link('edit/'.$questions[0]->id); ?>" id="questions_form">
<div class="editcate_ct">
	<div class="btarticle">
    	<input type="button" value="Cancel" class="btn" onclick="$('#light_adct').hide();$('#fade_adct').hide();" />
        <input type="submit" value="Save & Continute" class="btn" />
    </div>
	<div class="boxadd">
    	<ul class="linect">
    		<li>
                <span class="left"><b>Họ tên<font color="red">(*)</font> :</b></span>
                <span class="right"><?php echo $questions[0]->fullname;?></span>
            </li>
    		<li>
                <span class="left"><b>Tiêu đề<font color="red">(*)</font> :</b></span>
                <span class="right"><input type="text" name="txt_title" value="<?php echo $questions[0]->title;?>" style="width:60%; margin:0;" /></span>
            </li>
            <li>
            	<span class="left">Nội dung hỏi</span>
            	<span class="right">
                	<textarea id="txt_answer" name="txt_answer" style="width:82%; height:200px;"><?php echo $questions[0]->contents;?></textarea>
                </span>            	
            </li>                        
            <li>
       			<span class="left"><b>&nbsp;</b></span>
       			 <span class="right">
       			 	<input id="cck_usually" <?php echo ($questions[0]->usually == 'yes') ? 'checked="checked"' : '';?> type="checkbox"  name="cck_usually"  style="margin:0;" /><b>Câu hỏi thường gặp:</b>                   
                </span>
       		</li>
       		<li>
       			<span class="left"><b>Trạng thái:</b></span>
       			 <span class="right">
                    <select style="width:130px;" name="status" id="status">
                      <option <?php echo ($questions[0]->status == 'yes') ? 'selected="selected"' : '';?> value="yes">Kích hoạt</option>
                      <option <?php echo ($questions[0]->status == 'no') ? 'selected="selected"' : '';?> value="no">Chưa kích hoạt</option>
                    </select>
                </span>
       		</li>
        </ul>
    </div>
    <div class="btarticle">
    	<input type="button" value="Cancel" class="btn" onclick="$('#light_adct').hide();$('#fade_adct').hide();" />
        <input type="submit" value="Save & Continute" class="btn" />
    </div>
</div>
</form>
<script>
$('#questions_form').iframer({
    onComplete: function(msg){
    	if(msg == 'yes') {
    		$('#light_adct').hide();$('#fade_adct').hide();
            load_content('row_<?php echo $questions[0]->id; ?>', admin_url+'questions/load_row/<?php echo $questions[0]->id; ?>');
            $('.linecate2').has('#row_<?php echo $questions[0]->id; ?>').css('background-color', '#FFFFE0');
    	}
    	else show_error('div_message', msg)
    }
});
</script>